#include 'protheus.ch'

/*/{Protheus.doc} MT105GRV
(long_description)
@author Guilherme
@since 08/04/2015
@version 1.0
@example
(examples)
@see (links_or_references)
/*/
User Function MT105GRV 
		
	 Local cNum := SCP->CP_NUM
			
	//DbSelectArea("SCP")
	//SCP->(DbSetOrder(1))
	SCP->(DbGoTop())
	IF SCP->(DBSEEK(XFILIAL("SCP")+cNum))
		While !SCP->(EOF()) .AND. SCP->CP_NUM == cNum
			If SCP->CP_ZTIPO $ "PI,PA"
				RecLock("SCP",.F.)
				SCP->CP_STATSA := "L"
				Msunlock("SCP")
			EndIf
			SCP->(DbSkip())
		EndDo
	EndIf
	
return